'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const db = uniCloud.database(); //代码块为cdb
	const collection = db.collection('bookkeep');
	
	let queryStringParameters = event.queryStringParameters
	let res = await collection.where({
			date: queryStringParameters['date'],
			userId: queryStringParameters['userId'],
	}).update({
		list: queryStringParameters['list']
	})
	
	return {
		mesg: '新增成功',
		code: 200
	}
};
